<template>
  <lay-container fluid="true" class="reset-password">
    <div class="tab-content">
      <lay-form :model="myResetPasswordBo" ref="formRef" label-width="60" size="sm">
        <lay-form-item label="旧密码" prop="oldPassword" required>
          <lay-input v-model="myResetPasswordBo.oldPassword" type="password" allow-clear></lay-input>
        </lay-form-item>
        <lay-form-item label="新密码" prop="newPassword" required>
          <lay-input v-model="myResetPasswordBo.newPassword" type="password" allow-clear ></lay-input>
        </lay-form-item>
        <lay-form-item label="确认" prop="confirmPassword" required>
          <lay-input v-model="myResetPasswordBo.confirmPassword" type="password" allow-clear ></lay-input>
        </lay-form-item>
        <lay-form-item style="text-align: center">
          <lay-button type="primary" @click="toResetMyPassword">提交</lay-button>
          <lay-button @click="toReset(formRef)">重置</lay-button>
        </lay-form-item>
      </lay-form>
    </div>
  </lay-container>
</template>
<script setup lang="ts">
import {ref, reactive} from 'vue'
import { resetMyPassword} from "@/api/module/myUser";
import useFxwForm from "@/hooks/useFxwForm";

const {toReset} = useFxwForm()

const formRef = ref()

// 修改信息
const myResetPasswordBo = {
  oldPassword: '',
  newPassword: '',
  confirmPassword: '',
};
const toResetMyPassword = function () {
  resetMyPassword(myResetPasswordBo).then(res => {

  })
}


</script>

<style scoped>
.reset-password{
  height: calc(100vh - 205px);
}
.tab-content {
  height: 368px;
  max-width: 500px;
  padding: 0 20px;
  background-color: #fff;
}
</style>